import { createApp } from 'vue'
import router from './router'
import { store } from '@/store'
import { setupDirectives } from './directives'
import 'virtual:svg-icons-register'

import 'reset-css'
import '@/styles/index.scss'

import ElementPlus from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import './styles/element.scss'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'

import SvgIcon from '@/components/SvgIcon.vue'
import ThreeDimensionalModel from '@/components/global/ThreeDimensionalModel.vue'
import App from './App.vue'

window.$message = ElMessage
window.$confirm = ElMessageBox.confirm
window.$router = router

const app = createApp(App)
setupDirectives(app)

app
  .use(router)
  .use(store)
  .use(ElementPlus, { locale: zhCn, size: 'large' })
  .component('SvgIcon', SvgIcon)
  .component('ThreeDimensionalModel', ThreeDimensionalModel)
  .mount('#app')
